package com.zhangjie.servicemap;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @Auther: zj
 * @Date: 2024/2/6 - 02 - 06 - 14:19
 * @Description: com.zhangjie.servicemap
 * @version: 1.0
 */
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.zhangjie.servicemap.mapper")
//@EnableFeignClients
public class ServiceMapApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServiceMapApplication.class);
    }

    /**
     * RestTemplate 用于发送 HTTP 请求并处理响应，在程序中直接注入报错的话，可以在此构建一个bean
     * @return
     */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
